package com.jl.jlapp.mvp.base;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import butterknife.ButterKnife;
import com.jaeger.library.StatusBarUtil;
import com.jl.jlapp.R;
import com.jl.jlapp.mvp.activity.MainActivity;

public abstract class BaseActivity
  extends AppCompatActivity
{
  @LayoutRes
  protected abstract int contentViewLayoutRes();
  
  public void finish()
  {
    super.finish();
    if (!getClass().equals(MainActivity.class)) {
      overridePendingTransition(R.anim.cp_push_bottom_in, R.anim.cp_push_bottom_out);
    }
  }
  
  protected void onCreate(@Nullable Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(contentViewLayoutRes());
    StatusBarUtil.setColor(this, ContextCompat.getColor(getApplicationContext(), R.color.light_blue), 128);
    ButterKnife.bind(this);
  }
  
  public void startActivity(Intent paramIntent)
  {
    super.startActivity(paramIntent);
    if (paramIntent == null) {}
    while ((paramIntent.getComponent() == null) || (paramIntent.getComponent().getClassName().equals(MainActivity.class.getName()))) {
      return;
    }
    overridePendingTransition(R.anim.cp_push_bottom_out, R.anim.cp_push_bottom_in);

//    overridePendingTransition(17432576, 17432577);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/mvp/base/BaseActivity.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */